<template>
  <dialog-box
  :isDialog="false"
    ref="myDialog"
    :showFooter="true"
    width="600px"
    cacelName="关闭"
    @close="close"
    :isFooterSlot="true"
    :isShowSave="false"
    title="日志"
  >
    <template v-slot:dialogMain>
      <div>
        <t-table
          :table="table"
          :columns="table.columns"
          :isShowPagination="false"
        />
      </div>
    </template>
  </dialog-box>
</template>

<script setup lang="ts">
import dialogBox from "@/components/dialog-box/index.vue";
import { onMounted, computed, reactive, toRefs, ref } from "vue";
import type { ComponentSize, FormInstance, FormRules } from "element-plus";
const myDialog = ref(null);


let state = reactive({
  title: "",
  
});
// 定义完成后，用defineExpose()暴露给父组件
const open = (title: string) => {
  state.title = title;
  myDialog.value.handleOpen();
};
const close = () => {
  myDialog.value.handleClose();
};
defineExpose({
  open,
  close,
});
const table = ref<TableTypes.Table>({
  data: [
    {
      id: "1",
      date: "2019-09-25",
      name: "张三",
    },
    {
      id: "2",
      date: "2019-09-26",
      name: "张三1",
    },
    {
      id: "3",
      date: "2019-09-26",
      name: "张三1",
    },
    {
      id: "4",
      date: "2019-09-26",
      name: "张三1",
    }
  ],
  firstColumn: { type: "index", width: 80, fixed: true },
  // 接口返回数据
  //   data: [],
  // 表头数据
  columns: [
    { prop: "date", label: "时间", minWidth: "100" },
    { prop: "name", label: "操作", minWidth: "180" },
  ],
});
</script>

<style scoped>
</style>
